package com.tfjybj.itoo.exam.model;/*
 @author 天赋吉运-xxx
 @DESCRIPTION ${DESCRIPTION}
 @create 2018/12/11 
*/

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import java.util.List;

@ApiModel(value = "QuestionModel:试题表")
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
public class QuestionTypeClassifyModel {

    @ApiModelProperty(value = "question主键")
    @Column(name = "id")
    private String key;

    @ApiModelProperty(value = "题型")
    private String questionTypeId;

    @ApiModelProperty(value = "题型值")
    private String value;

    @ApiModelProperty(value = "试题分类ID")
    private String questionClassifyId;


    @ApiModelProperty(value = "试题分类名称（所在章节）")
    private String title;


    @ApiModelProperty(value = "课程ID")
    private String courseId;

    @ApiModelProperty(value = "是否叶子节点")
    private boolean isLeaf;

    @ApiModelProperty(value = "试题分类的父Id（所在章节/自定义类型 的父Id）")
    private String parentId;

    @ApiModelProperty( value = "试题分类下的树形集和")
    public List<QuestionTypeClassifyModel> children;

    public boolean getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(boolean leaf) {
        isLeaf = leaf;
    }
}
